<template>
  <div>
    搜索
    <van-search
      v-model="value2"
      show-action
      placeholder="请输入搜索关键词"
      @update:model-value="suosou"
    >
      <template #action>
        <div @click="onClickButton">搜索</div>
      </template>
    </van-search>
    <router-link v-for="item in list" :key="item.id" :to="'/xq/'+item.id">
        <div>
      <p>{{ item.title }}</p>
    </div>
    </router-link>
    
  </div>
</template>

<script setup>
import { ref } from "vue";
import { showToast } from "vant";
import fd from '../Fangdou/index'
import axios from "../Axios/index";
const value2 = ref("");
const list = ref([]);
const goods = ref([]);
const onSearch = (val) => showToast(val);
const onClickButton = () => showToast(value.value);
axios.post("/postlist").then((resp) => {
  console.log(444, resp);
  list.value = resp.data;
});
const suosou = () => {
  value2.value = list.value;

  list.value = goods.value.includes((item) => goods.includes);
};
</script>

<style lang="scss" scoped>
a{
    color: #000;
}
</style>